home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 January / Ahoy_Magazine_87-01_1987_Double_L.d64 / Sentence Disas. (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  469b  |  18 lines

  1. 0 rem << cd37-2 >>
  2. 1 rem commodares problem #33-2:
  3. 2 print"[147]  sentence disassembler"
  4. 3 rem solution by
  5. 4 rem   j.v. henry
  6. 5 rem
  7. 10 input"[147]a phrase or sentence";s$
  8. 20 l=len(s$) : h$=""
  9. 30 for i=1 to l : h1$=mid$(s$,i,1)
  10. 40 if h1$<>" " then h$=h$+h1$
  11. 50 if h1$=" " or i=l then j=i : i=l
  12. 60 next
  13. 70 if len(h$)>0 then print h$;tab(25)len(h$) : le=le + len(h$)
  14. 80 s$=right$(s$,l-j) : if l-j>0 then 20
  15. 90 print tab(25);"[163][163]" : rem commodore-t
  16. 100 le$=str$(le) : l2=len(le$)
  17. 110 print chr$(34)+"total characters"+chr$(34)+" =" ;tab(27-l2);le
  18.